/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package services;

/**
 *
 * @author ntfsbk
 */
public class ConfirmThread extends Thread{
    String userId;
    String serverIp;
    int timeInterval;
    public ConfirmThread(){
        
    }
    
    public ConfirmThread(String UserId,String ServerIp,int TimeInterval){
        this.userId=UserId;
        this.serverIp=ServerIp;
        this.timeInterval=TimeInterval;
    }
    
    @Override
    public void run(){
        AccountServices services=new AccountServices();
        try {
            Thread.currentThread().sleep(timeInterval);
            while (true) {                
                services.confirm(userId, serverIp);
                Thread.currentThread().sleep(timeInterval);
            }
        } catch (Exception e) {
        } 
    }
}
